﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CaseComment.aspx.cs" Inherits="services_CaseComment" %>
<%@ Register Assembly="obout_Grid_NET" Namespace="Obout.Grid" TagPrefix="cc1" %>
<%@ Register TagPrefix="cc1" Namespace="Obout.Interface" Assembly="obout_Interface" %>
<%@ Register TagPrefix="obout" Namespace="OboutInc.Flyout2" Assembly="obout_Flyout2_NET"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../style/Style.css" rel="stylesheet" type="text/css" />    
	<link rel="stylesheet" href="../style/bubble-tooltip.css" media="screen" />
	<script type="text/javascript" src="../js/bubble-tooltip.js"></script>

    <link href="../js/shadowbox/shadowbox.css" rel="stylesheet" type="text/css" />        
    <script src="../js/shadowbox/shadowbox.js" type="text/javascript"></script>        
    <script src="../js/Axesat.js" type="text/javascript"></script>
    
</head>

<script type="text/javascript">
    function attachFlyoutToLink(oLink, index) {	
//        try {	        	        
//            <%=Flyout1.getClientID()%>.Close();        
//            <%=Flyout1.getClientID()%>.AttachTo(oLink.id);
//            var sNewHtml = getRecordInfo(oLink, index);
//            document.getElementById("divFlyoutContent").innerHTML = sNewHtml;
//            <%=Flyout1.getClientID()%>.Open();
//        } catch(ex){}
    }
    
    function closeFlyout() {
//        try {
//            <%=Flyout1.getClientID()%>.Close();
//        } catch(ex) {};
    }
    
    function getRecordInfo(oLink, iIndex) {
//        
//        var sComentario = Grid1.Rows[iIndex].Cells[4].Value;
//        		    
//        var sNewHtml = "<table STYLE=\"background-color: #EDEDED; width:250px; height:100%;\">";
//        sNewHtml += "<tr><td valign='top'><b>COMENTARIO:</b><br />" + sComentario + "</td></tr>";        
//        sNewHtml += "</table>";
//        
//        return sNewHtml;
    }
</script>		

<body style="color: #4068A3; background-color: #004387; margin-top: 10px; font-size:12px;">

<div id="bubble_tooltip" style="z-index:100">
	<div class="bubble_top"><span></span></div>
	<div class="bubble_middle"><span id="bubble_tooltip_content"></span></div>
	<div class="bubble_bottom"></div>
</div>

    <form id="form1" runat="server">
    <div>
    <center>
        <br />        
        <asp:HiddenField ID="hdnIdCasoSF" runat="server" />
        <table style="background-color: #EDEDED; text-align:left;" width="580px" >
            <tr>
                <td colspan="5">&nbsp;<br /></td>
            </tr>        
            <tr>                
                <td width="5px">                
                &nbsp;
                    </td>
                <td width="120px">
                    Número de caso:</td>
                <td width="170px">
                    <asp:Label ID="lblNumeroCaso" runat="server" CssClass="labelBlack"></asp:Label>
                </td>
                <td width="120px">
                    Prioridad:</td>
                <td width="170px">
                    <asp:Label ID="lblPrioridad" runat="server" CssClass="labelBlack"></asp:Label>
                </td>
            </tr>
            
            <tr>                
                <td width="5px">                
                &nbsp;
                    </td>
                <td width="120px">
                    Estado:</td>
                <td width="170px">
                    <asp:Label ID="lblEstado" runat="server" CssClass="labelBlack"></asp:Label>
                </td>
                <td width="120px">
                    Motivo caso:</td>
                <td width="170px">
                    <asp:Label ID="lblMotivo" runat="server" CssClass="labelBlack"></asp:Label>
                </td>
            </tr>
            <tr>
                <td width="5px">
                &nbsp;
                    </td>
                <td width="120px">
                    Fecha de apertura:</td>
                <td width="170px">
                    <asp:Label ID="lblFechaApertura" runat="server" CssClass="labelBlack"></asp:Label>
                </td>
                <td width="120px">
                    Tipo de caso:</td>
                <td width="170px">
                    <asp:Label ID="lblTipoCaso" runat="server" CssClass="labelBlack"></asp:Label>
                </td>
            </tr>
            <tr>
                <td width="5px">
                &nbsp;
                    </td>
                <td width="120px">
                    Problema encontrado:</td>
                <td width="170px">
                    <asp:Label ID="lblProblemaEncontrado" runat="server" CssClass="labelBlack"></asp:Label>
                </td>
                <td width="120px">
                    <asp:Label ID="lblFechaVisitaProgramada" runat="server" Text="Fecha visita programada:" Visible="false"></asp:Label></td>
                <td width="170px">
                    <asp:Label ID="lblFechaVisitaProgramadaValor" runat="server" CssClass="labelBlack"></asp:Label>
                </td>
            </tr>
            <tr>
                <td width="5px">
                &nbsp;
                    </td>
                <td width="120px">
                    Acciones correctivas y preventivas:</td>
                <td width="170px">
                    <asp:Label ID="lblAccionesCorrectivas" runat="server" CssClass="labelBlack"></asp:Label>
                </td>
                <td width="120px">
                    Fecha de cierre:</td>
                <td width="170px">
                    <asp:Label ID="lblFechaCierre" runat="server" CssClass="labelBlack"></asp:Label>
                </td>
            </tr>

            <tr>
                <td width="5px">
                &nbsp;
                    </td>
                <td width="120px" valign="top">
                    Descripción:</td>
                <td colspan="3" width="460px">
                    <%--<asp:TextBox ID="txtDescripcion" runat="server" TextMode="MultiLine" Height="80" Width="460px" ReadOnly="true"></asp:TextBox>--%>
                    <asp:Label ID="lblDescripcion" runat="server" CssClass="labelBlack"></asp:Label>
                </td>
                
            </tr>
            <tr>
                <td width="5px">
                &nbsp;
                    </td>
                <td width="120px">
                    <asp:Label ID="lblDescripcion1" runat="server" Text="Acciones durante la visita:" Visible="false"></asp:Label></td>
                <td colspan="3" width="170px">
                    <asp:Label ID="lblDescricpion1Valor" runat="server" CssClass="labelBlack"></asp:Label>
                </td>
            </tr>
            

            <tr>
                <td align="center">
                    </td>
                <td align="center" colspan="4">
                    <img alt="" src="../images/line.jpg" style="width: 580px; height: 8px" /></td>
            </tr>
            <tr>
                <td colspan="5">&nbsp;</td>
            </tr>
            <tr>
                <td align="center">&nbsp;
                    </td>                        
                <td colspan="4">
                <cc1:Grid ID="Grid1" runat="server" FolderStyle="styles/black_glass" AutoGenerateColumns="False" 
                    Serialize="true"
                    EnableTypeValidation="false" AllowAddingRecords="false" 
                    AllowFiltering="False" Width="640px" AllowPaging="false"
                    AllowPageSizeSelection="false" AllowSorting="false" 
                        ShowFooter="false" onrowdatabound="Grid1_RowDataBound">
                    <FilteringSettings FilterPosition="Top" FilterLinksPosition="Bottom"/>                    
                    <Columns>
                    <cc1:Column ID="Column6" DataField="id_comentario" runat="server" Visible="false">                        
                    </cc1:Column>                    
                    <cc1:Column ID="Column4" DataField="fecha_comentario" runat="server" HeaderAlign="left" HeaderText="Fecha">
                    </cc1:Column>
                    <cc1:Column ID="Column7" DataField="persona_comentario" HeaderText="Persona" runat="server" HeaderAlign="left">
                    </cc1:Column>                                        
                    <cc1:Column ID="Column3" DataField="tipo_comentario" HeaderText="Tipo Comentario" runat="server" HeaderAlign="left">                         
                    </cc1:Column>   
                    <cc1:Column ID="Column1" DataField="comentario" HeaderText="Comentario" runat="server" HeaderAlign="left" Align="left"> 
                        <TemplateSettings TemplateId="TemplateItemDescripcion" />
                    </cc1:Column>                                                             
                    </Columns>                                                            
                                           

                    <TemplateSettings RowEditTemplateId="tplRowEdit" />
                    <LocalizationSettings AddLink="Nuevo" CancelAllLink="Cancelar todo" 
                        CancelLink="Cancelar" DeleteLink="Eliminar" EditLink="Editar" 
                        Filter_ApplyLink="Aplicar Filtro" Filter_HideLink="Ocultar filtro" 
                        Filter_RemoveLink="Quitar filtro" Filter_ShowLink="Mostrar filtro" 
                        FilterCriteria_Contains="Contiene" FilterCriteria_DoesNotContain="No contiene" 
                        FilterCriteria_EndsWith="Termina con" FilterCriteria_EqualTo="Igual a" 
                        FilterCriteria_GreaterThan="Mayor a" 
                        FilterCriteria_GreaterThanOrEqualTo="Mayor o igual a" 
                        FilterCriteria_IsEmpty="Vacio" FilterCriteria_IsNotEmpty="No vacio" 
                        FilterCriteria_IsNotNull="No nulo" FilterCriteria_IsNull="Nulo" 
                        FilterCriteria_NoFilter="Sin filtro" FilterCriteria_NotEqualTo="Diferente a" 
                        FilterCriteria_SmallerThan="Menor que" 
                        FilterCriteria_SmallerThanOrEqualTo="Menor o igual a" 
                        FilterCriteria_StartsWith="Comienza con" 
                        Grouping_GroupInformationNextPage=" (Mostrando XXXXX de YYYYY registros - This group is continued on the next page)" 
                        Grouping_GroupInformationPreviousNextPage=" (Mostrando XXXXX de YYYYY registros - This group was started on the previous page and continues on the next page)" 
                        Grouping_GroupInformationPreviousPage=" (Mostrando XXXXX de YYYYY registros - This group was started on the previous page)" 
                        LoadingText="Cargando..." ModifyLink="Modificar" 
                        NoRecordsText="No existen comentarios" 
                        Paging_ManualPagingLink="Ir a la pagina »" Paging_OfText="de" 
                        Paging_PageSizeText="Registros por pagina" Paging_PagesText="Paginas:" 
                        Paging_RecordsText="Registros:" RemoveLink="Quitar" SaveAllLink="Guardar todo" 
                        SaveLink="Guardar" UpdateLink="Actualizar" />
                    <Templates>
                        <cc1:GridTemplate runat="server" ID="TemplateItemDescripcion">
                            <Template>
                                <asp:HyperLink ID="lnkComments" runat="server"><img src="../images/document.jpg" alt="0" border="0" /></asp:HyperLink>                                                            
                            </Template>
                        </cc1:GridTemplate>                                                
        
                    </Templates>

                </cc1:Grid>
                
		        <obout:Flyout runat="server" ID="Flyout1" zIndex="100" Align="LEFT" Position="BOTTOM_CENTER" CloseEvent="NONE" OpenEvent="NONE" DelayTime="500">
		            <div id="divFlyoutContent" style="width: 250px; height: 250px; border: 1px solid #000000;"> 
		                test               
                    </div>
                </obout:Flyout>
                
                
                </td>                
            </tr>
            <tr>
                <td align="center">
                    </td>
                <td align="center" colspan="4">
                    <img alt="" src="../images/line.jpg" style="width: 580px; height: 8px" /></td>
            </tr> 
            <tr>
                <td>
                    </td>
                <td>
                    Agregar comentario:</td>
                <td colspan="3">
                    <asp:TextBox ID="txtAgregarComentario" runat="server" Width="90%" TextMode="MultiLine" Height="100px"
                        ></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtAgregarComentario"
                            Display="None" ErrorMessage="Debe escribir el comentario" InitialValue=""
                            ValidationGroup="Crear"></asp:RequiredFieldValidator>                
                        
                </td>
            </tr>   
            <tr>
                <td>
                    </td>          
                <td colspan="4" align="center">
                <asp:Label ID="lblMensaje" runat="server" Text=""></asp:Label>
                </td>
            </tr>                    
            <tr>
                <td>
                    </td>
                <td>
                    </td>
                <td align="right" colspan="3">
                    <asp:ImageButton ID="btnCrearComentario" runat="server" 
                        ImageUrl="../images/btn_agregarComentario.jpg" ValidationGroup="Crear"
                        onclick="btnCrearComentario_Click" />
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
                        ShowSummary="False" ValidationGroup="Crear" />                                                
                </td>
            </tr>
            <tr>
                <td align="center">
                    </td>
                <td align="center" colspan="4">
                    <img alt="" src="../images/line.jpg" style="width: 580px; height: 8px" /></td>
            </tr> 
            <tr>
                <td>
                    </td>
                <td>
                    Autorización de cierre de caso:</td>
                <td colspan="3">
                    <asp:TextBox ID="txtComentarioCierre" runat="server" Width="90%" TextMode="MultiLine" Height="100px"
                        ></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtComentarioCierre"
                            Display="None" ErrorMessage="Debe escribir el comentario de cierre del caso" InitialValue=""
                            ValidationGroup="Cerrar"></asp:RequiredFieldValidator>                
                        
                </td>
            </tr>   
            <tr>
                <td>
                    </td>          
                <td colspan="4" align="center">
                <asp:Label ID="lblMensajeCierre" runat="server" Text=""></asp:Label>
                </td>
            </tr>                    
            <tr>
                <td>
                    </td>
                <td>
                    </td>
                <td align="right" colspan="3">
                    <asp:ImageButton ID="btnCerrarCaso" runat="server" 
                        ImageUrl="../images/btn_cerrarcaso.jpg" ValidationGroup="Cerrar"
                        onclick="btnCerrarCaso_Click" />
                    <asp:ValidationSummary ID="ValidationSummary2" runat="server" ShowMessageBox="True"
                        ShowSummary="False" ValidationGroup="Cerrar" />                                                
                </td>
            </tr>
            
        </table>
    </center>
    </div>
    </form>
</body>
</html>
